<template name="daohang">
		<view class="nav-2">
		<!--用户端导航-->
		<view class="dibunav">
			<view class="dibunav1" @click="url" data-url="/pages/index/index">
				<image :src="count==1?'/static/images/home2.png':'/static/images/home.png'" mode="aspectFit"></image>
				<view :class="count==1?'dibunav1-2':'dibunav1-1'">首页</view>
			</view>
			<view class="dibunav1" @click="url" data-url="/pages/goods/index">
				<image :src="count==2?'/static/images/fuwu2.png':'/static/images/fuwu.png'" mode="aspectFit"></image>
				<view :class="count==2?'dibunav1-2':'dibunav1-1'">分类</view>
			</view>
			<view class="dibunav1" @click="url" data-url="/pages/order/order">
				<image :src="count==3?'/static/images/order2.png':'/static/images/order.png'" mode="aspectFit"></image>
				<view :class="count==3?'dibunav1-2':'dibunav1-1'">订单</view>
			</view>
			<view class="dibunav1" @click="url" data-url="/pages/user/index">
				<image :src="count==4?'/static/images/user2.png':'/static/images/user.png'" mode="aspectFit"></image>
				<view :class="count==4?'dibunav1-2':'dibunav1-1'">我的</view>
			</view>
		</view>
		
		<!--老师端导航-->
		<!--<view class="dibunav" v-if="type==2">
			<view class="dibunav2" @click="url" data-url="/pages/teacher/kecheng">
				<image :src="count==2?'/static/images/fuwu2.png':'/static/images/fuwu.png'" mode="aspectFit"></image>
				<view :class="count==2?'dibunav1-2':'dibunav1-1'">发布服务</view>
			</view>
			<view class="dibunav2" @click="url" data-url="/pages/torder/order">
				<image :src="count==3?'/static/images/order2.png':'/static/images/order.png'" mode="aspectFit"></image>
				<view :class="count==3?'dibunav1-2':'dibunav1-1'">在线订单</view>
			</view>
			<view class="dibunav2" @click="url" data-url="/pages/user/index">
				<image :src="count==4?'/static/images/user2.png':'/static/images/user.png'" mode="aspectFit"></image>
				<view :class="count==4?'dibunav1-2':'dibunav1-1'">师傅页面</view>
			</view>
		</view>-->
		</view>
</template>

<script>
	var app=getApp();
	export default {
		name:"daohang",
		data() {
			return {
				type:uni.getStorageSync('js_type')
			};
		},
		 // 此处定义传入的数据
		props: {
			count: {
			}
		},
		methods: {
			url(e){
				var url=e.currentTarget.dataset.url;
				uni.reLaunch({
				    url: url
				});
			}
		}
	}
</script>

<style>
	.nav-2{width:100%;}
	.dibunav{width:100%;height:49px;overflow: hidden;border-top:1px #eee solid;position: fixed;z-index: 9999;background-color: #fff;left:0px;bottom:0px;}
	.dibunav1{width:25%;height:49px;float: left;text-align: center;}
	.dibunav2{width:33.33%;height:49px;float: left;text-align: center;}
	.dibunav1 image{width:25px;height:25px;margin-top: 2px;}
	.dibunav2 image{width:25px;height:25px;margin-top: 2px;}
	.dibunav1-1{height:20px;width:100%;line-height: 15px;font-size: 0.8rem;color:#666;}
	.dibunav1-2{height:20px;width:100%;line-height: 15px;font-size: 0.8rem;color:#05c160;}
</style>
